package com.wudl.govern.service.impl;

import com.wudl.govern.domain.MetaTrigger;
import com.wudl.govern.mapper.MetaTriggerMapp;
import com.wudl.govern.service.MetaTriggerService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * meta_trigger Service
 *
 * @author wudl
 */
@Service
public class MetaTriggerServiceImpl implements MetaTriggerService {

    @Autowired
    private MetaTriggerMapp metaTriggerMapp;

    /**
     * 分页查询
     */
    @Override
    public  List<MetaTrigger> page(Integer page, Integer size) {
        PageHelper.startPage(page, size);
        return  metaTriggerMapp.selectList();
    }

    /**
     * 获取
     */
    @Override
    public MetaTrigger getById(Object id) {
        return metaTriggerMapp.selectById(id);
    }

    /**
     * 保存
     */
    @Override
    public void save(MetaTrigger metaTrigger) {
        metaTriggerMapp.insert(metaTrigger);
    }

    /**
     * 更新
     */
    @Override
    public void updateById(MetaTrigger metaTrigger) {
        metaTriggerMapp.updateById(metaTrigger);
    }

    /**
     * 删除
     */
    @Override
    public void removeById(Object id) {
        metaTriggerMapp.deleteById(id);
    }

}